Implement user option ruby-align-chained-calls
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 31 Jan 2014 17:13:49 +0000 (19:13 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 31 Jan 2014 17:13:49 +0000 (19:13 +0200)
commitbb47324f27df9ddac487fe498eb61cf4b59454bb
tree4b56142415116bc6bb53d54dfe74a54c7fa43e47
parent550d2a8326c7805a8b0a279918a4b7724c5f1c8d
Implement user option ruby-align-chained-calls

* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls): New option.
(ruby-smie-grammar): Make "." right-associative.  Make its priority
lower than the ternary and all binary operators.
(ruby-smie-rules): Indent "(" relative to the first non-"."
parent, or the first "." parent at indentation.  Use
`ruby-align-chained-calls' for indentation of "." tokens.

* test/automated/ruby-mode-tests.el (ruby-align-chained-calls):
New test.
lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/ChangeLog
test/automated/ruby-mode-tests.el
test/indent/ruby.rb